﻿<Window x:Class="EmployeeTracker.View.IndustryView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="IndustryView" Height="500" Width="600">
    <Grid>
        <Border Style="{StaticResource DetailBorder}" Margin="0,-10,0,10" Grid.ColumnSpan="2">
            <DataGrid Name="grdIndustry" SelectedItem="{Binding Path=.CurrentIndustry, Mode=TwoWay}" ItemsSource="{Binding Path=AllIndustries}" AutoGenerateColumns="False" Margin="0,7,504,0" >
                <DataGrid.Columns>
                    <DataGridTextColumn Header="Industry" Width="Auto" Binding="{Binding Path=IndustryName}" />
                </DataGrid.Columns>
            </DataGrid>
        </Border>
        <Label HorizontalAlignment="Left" Content="Industry" Background="Aquamarine" Margin="345,10,0,0" VerticalAlignment="Top" Height="27" RenderTransformOrigin="0.5,0.5" Width="61"/>

        <TextBox HorizontalAlignment="Left" Height="23" Margin="450,10,0,0" VerticalAlignment="Top" Width="120" Text="{Binding Path= .CurrentIndustry.IndustryName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged }"/>

        <Button HorizontalAlignment="Left" Content="Add New" Margin="408,99,0,0" VerticalAlignment="Top" Width="121" Height="22" Command="{Binding Path=AddNewCommand}" RenderTransformOrigin="0.456,0.247"/>
        <Button HorizontalAlignment="Left" Content="Edit" Margin="408,136,0,0" VerticalAlignment="Top" Width="121" Height="22" Command="{Binding Path=EditCommand}"/>
        <Button HorizontalAlignment="Left" Content="Save" Margin="408,258,0,0" VerticalAlignment="Top" Width="121" Height="22" Command="{Binding Path=SaveCommand}"/>
        <Button HorizontalAlignment="Left" Content="Cancel" Margin="408,217,0,0" VerticalAlignment="Top" Width="121" Height="22" Command="{Binding Path=CancelCommand}"/>
        <Button HorizontalAlignment="Left" Content="Delete" Margin="408,179,0,0" VerticalAlignment="Top" Width="121" Height="22" Command="{Binding Path=DeleteCommand}"/>
    </Grid>
</Window>
